Skip to main content

Set Value in DataStore vs Save Output

While these 2 steps may seem similar, they are very different under the hood.

In short: use of Set value in data store is discouraged. For the majority of use-cases, use Save output.

When Should I Use Set value in data store?

As the name suggests, this step sets a value in a data store. You should use this whenever you need to modify a value in a store. However, as described in detail in Changes from old ways of thinking, the data-stores should only represent UI-specific data, such as direct inputs from the user (such as which value is selected in a drop-down).

This means that you should only rarely need to use this step. You should only need to use this step when:

  • Modifying an input - i.e. resetting a drop-down once the model has been run
  • Modifying the same piece of data across multiple workflows - i.e. controlling the 'open' state of a Modal component. You may have a modalOpen boolean value in a data store, which you may want to set to true/false in different workflows.

Why Shouldn't I Use Set value in data store?

In workflows that use this step, many performance optimizations cannot be applied by App Builder. See Configuring page load behavior for an example of this.

Using this step in situations that could use Save output instead will lead to worse user experience.